//
//  WithDrawRecViewController.m
//  penzer
//
//  Created by caiyc on 2018/10/3.
//  Copyright © 2018年 caiyc. All rights reserved.
//

#import "WithDrawRecViewController.h"
#import "WithDraw_Cell.h"
@interface WithDrawRecViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property(nonatomic,strong)NSMutableArray *dataSouce;
@end

@implementation WithDrawRecViewController
-(NSMutableArray *)dataSouce{
    if(!_dataSouce){
        _dataSouce = [NSMutableArray array];
    }
    return _dataSouce;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
       self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
     self.tableView.showsVerticalScrollIndicator = 0;
    self.tableView.backgroundColor  = [UIColor clearColor];
    [self loadData];
    // Do any additional setup after loading the view from its nib.
}
-(void)loadData{
    NSDictionary *param = @{@"ac":@"member",
                            @"op":@"member",
                            @"ctrl":@"live_anchor",
                            @"ta":@"tixian"};
    [self weqPostHandle:param success:^(id response) {
        if(response){
            [self.dataSouce addObjectsFromArray:response[@"data"]];
            [self.tableView reloadData];
        }
    } failure:^(NSError *error) {
        
    }];
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.dataSouce.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *cellID = @"cell";
    WithDraw_Cell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    if(!cell){
        cell = [[[NSBundle mainBundle]loadNibNamed:@"WithDraw_Cell" owner:self options:nil]lastObject];
    }
    return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 100;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
